<!--
 * @Description:
 * @Author bianpengfei
 * @create 2021/4/10 1:36
 -->
<template>
  <!--回到顶部-->
  <el-backtop v-if="_headerShow" :target="target" :bottom="50" :visibility-height="100" style="z-index: 999">
    <div class="up-top">
      <i class="iconfont-pc bpf-icon-dingbu1"></i>
      <div>顶部</div>
    </div>
  </el-backtop>
</template>

<script>
import { get } from 'vuex-pathify'

export default {
  name: 'AppBacktop',
  props: {
    target: {
      type: String,
      default: '.main__content'
    }
  },
  computed: {
    _headerShow: get('app/headerShow')
  }
}
</script>
<style scoped lang="scss">
.el-backtop {
  width: 50px;
  height: 50px;
  .up-top {
    border-radius: 4px;
    width: 100%;
    background-color: #f2f5f6;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: $--color-primary;
    padding: 2px;
    i {
      font-size: 20px;
    }
    div {
      font-size: 12px;
      margin-top: -5px;
    }
  }
}
</style>
